package model;

import util.Validator;

/**
 * Represents a natural number.
 * 
 * @author Henrik Wall
 * @author Rudolf Schmidt
 * @author Eugen Nemirowski
 */
@SuppressWarnings("serial")
public final class Nat extends Int {
	/**
	 * Constructor for {@link Nat}.
	 */
	private Nat(final long value) {
		super(value);
	}

	/**
	 * Creates a {@link Nat}.
	 * 
	 * @return a {@link Nat}.
	 * @throws IllegalArgumentException
	 *             if {@code value} is negative
	 */
	public static Nat create(final long value) {
		return new Nat(Validator.nonNegative(value, "value must not be negative"));
	}
}